import request from '@/utils/request'

export function upload(data) {
  return request({
    url: 'api/workflow/definitions',
    method: 'post',
    data
  })
}
export function diagrams(deploymentId) {
  return request({
    url: 'api/workflow/definitions/diagrams/' + deploymentId,
    method: 'get'
  })
}
export function convert(deploymentId) {
  return request({
    url: 'api/workflow/definitions/convert/' + deploymentId,
    method: 'put'
  })
}

export default { upload, diagrams, convert }
